package com.xucan.io;

import java.io.FileInputStream;

public class Chardemo {
    public static void main(String[] args) throws Exception {
        // 字节流转换为字符流
        FileInputStream fis = new FileInputStream("a.txt");
        int len;
        byte b[]=new byte[10];
        while ((len = fis.read(b)) != -1) {
            System.out.print(new String(b,0,len));
        }
        fis.close();
    }
}